<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let isFetching = false;

        async function fetchPageData(page) {
            if (isFetching) return;
            
            isFetching = true;
            disablePaginationButtons();
            
            try {
                const response = await fetch(`/api/data?page=${page}`);
                const data = await response.json();
                renderData(data);
            } catch (error) {
                console.error('请求失败:', error);
            } finally {
                isFetching = false;
                enablePaginationButtons();
            }
        }
    </script>
</body>
</html>